package com.youu.youu.manager.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.youu.youu.manager.bean.TRole;
import com.youu.youu.manager.service.RolesBackstageService;


@Controller
@RequestMapping("role")
public class RolesBackstageController {
	@Autowired
	RolesBackstageService rolesBackstageService;
	@RequestMapping("roles")
	public String getAllRoles(Model model) {
		List<TRole> list = rolesBackstageService.getAllRoles();
		model.addAttribute("roles", list);
		return "role";
		
	}
	
	
}
